package com.shcd.controller;

import com.shcd.service.DataMonitoringService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("LogVisualization")
public class DataMonitoringController {
    private final DataMonitoringService dataMonitoringService;

    @Autowired
    public DataMonitoringController(DataMonitoringService dataMonitoringService) {
        this.dataMonitoringService = dataMonitoringService;
    }

    @PostMapping("/getWnDataCount")
    public String getWnDataCount() {
        return dataMonitoringService.getWnDataCount();
    }

    @PostMapping("/getWnDataSortCount")
    public String getWnDataSortCount(){
        return dataMonitoringService.getWnDataSortCount();
    }

    @PostMapping("/getCatalogCount")
    public String getCatalogCount(){
        return dataMonitoringService.getCatalogCount();
    }

    @PostMapping("/getSpaceCount")
    public String getSpaceCount(){
        return dataMonitoringService.getSpaceCount();
    }

    @PostMapping("/getBusinessCount")
    public String getBusinessCount(){
        return dataMonitoringService.getBusinessCount();
    }

    @PostMapping("/getBusinessCount_wn")
    public String getBusinessCount_wn(){
        return dataMonitoringService.getBusinessCount_wn();
    }

    @PostMapping("/getBusinessCount_zf")
    public String getBusinessCount_zf(){
        return dataMonitoringService.getBusinessCount_zf();
    }

    @PostMapping("/getWnDataSum")
    public String getWnDataSum(){
        return dataMonitoringService.getWnDataSum();
    }

    @PostMapping("/getQCSum")
    public String getQCSum(){
        return dataMonitoringService.getQCSum();
    }

    @PostMapping("/getDataClearSum")
    public String getDataClearSum(){
        return dataMonitoringService.getDataClearSum();
    }

    @PostMapping("/getConsumerSum")
    public String getConsumerSum(){
        return dataMonitoringService.getConsumerSum();
    }

//    @PostMapping("/getDataResourceSum")
//    public String getDataResourceSum(){
//        return wnDataService.getDataResourceSum();
//    }
//
//    @PostMapping("/getRecordSum")
//    public String getRecordSum(){
//        return wnDataService.getRecordSum();
//    }
//
//    @PostMapping("/getBigDataSum")
//    public String getBigDataSum(){
//        return wnDataService.getBigDataSum();
//    }
//
//    @PostMapping("/getCreditSum")
//    public String getCreditSum(){
//        return wnDataService.getCreditSum();
//    }

    @PostMapping("/getGovernSituation")
    public String getGovernSituation(){
        return dataMonitoringService.getGovernSituation();
    }

    @PostMapping("/getClearSituation")
    public String getClearSituation(){
        return dataMonitoringService.getClearSituation();
    }

    @PostMapping("/getDataShard_business")
    public String getDataShard_business(){
        return dataMonitoringService.getDataShard_business();
    }

    @PostMapping("/getDataShard_space")
    public String getDataShard_space(){
        return dataMonitoringService.getDataShard_space();
    }

    @PostMapping("/getShareSituation_business")
    public String getShareSituation_business(){
        return dataMonitoringService.getShareSituation_business();
    }

    @PostMapping("/getShareSituation_space")
    public String getShareSituation_space() {
        return dataMonitoringService.getShareSituation_space();
    }

    @PostMapping("/getCellSituation_space")
    public String getCellSituation_space(){
        return dataMonitoringService.getCellSituation_space();
    }

    @PostMapping("/getCellSituation_business")
    public String getCellSituation_business(){
        return dataMonitoringService.getCellSituation_business();
    }

    @PostMapping("/getCollectsTrend")
    public String getCollectsTrend(){
        return dataMonitoringService.getCollectsTrend();
    }

    @PostMapping("/getChannelStatusMain")
    public String getChannelStatusMain(@RequestBody JSONObject o){return dataMonitoringService.getChannelStatusMain(o);}

    @PostMapping("/getChannelStatusDetail")
    public String getChannelStatusDetail(@RequestBody JSONObject o){return dataMonitoringService.getChannelStatusDetail(o);}

    @PostMapping("/insertChannelStatus")
    public String insertChannelStatus(@RequestBody JSONObject o){return dataMonitoringService.insertChannelStatus(o);}

    @PostMapping("/deleteChannelStatus")
    public String deleteChannelStatusMain(@RequestBody JSONObject o){return dataMonitoringService.deleteChannelStatus(o);}

    @PostMapping("/getDataServiceStatesMonitoring")
    public String getDataServiceStatesMonitoring(@RequestBody JSONObject o){return dataMonitoringService.getDataServiceStatesMonitoring(o);}

    @PostMapping("/getDataServiceStatesMonitoring_Detail")
    public String getDataServiceStatesMonitoring_Detail(@RequestBody JSONObject o){return dataMonitoringService.getDataServiceStatesMonitoring_Detail(o);}
}
